package com.san.hkhospital.entity;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * ClassName:MedicineExample
 * PackageName:com.san.hkhospital.entity
 * Description:
 *
 * @Author:yy
 * @CreatedAt:2024/11/13 19:26
 * 
 */
 
 
public class MedicineExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public MedicineExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andMedIdIsNull() {
            addCriterion("med_id is null");
            return (Criteria) this;
        }

        public Criteria andMedIdIsNotNull() {
            addCriterion("med_id is not null");
            return (Criteria) this;
        }

        public Criteria andMedIdEqualTo(Integer value) {
            addCriterion("med_id =", value, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdNotEqualTo(Integer value) {
            addCriterion("med_id <>", value, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdGreaterThan(Integer value) {
            addCriterion("med_id >", value, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("med_id >=", value, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdLessThan(Integer value) {
            addCriterion("med_id <", value, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdLessThanOrEqualTo(Integer value) {
            addCriterion("med_id <=", value, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdIn(List<Integer> values) {
            addCriterion("med_id in", values, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdNotIn(List<Integer> values) {
            addCriterion("med_id not in", values, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdBetween(Integer value1, Integer value2) {
            addCriterion("med_id between", value1, value2, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdNotBetween(Integer value1, Integer value2) {
            addCriterion("med_id not between", value1, value2, "medId");
            return (Criteria) this;
        }

        public Criteria andMedNameIsNull() {
            addCriterion("med_name is null");
            return (Criteria) this;
        }

        public Criteria andMedNameIsNotNull() {
            addCriterion("med_name is not null");
            return (Criteria) this;
        }

        public Criteria andMedNameEqualTo(String value) {
            addCriterion("med_name =", value, "medName");
            return (Criteria) this;
        }

        public Criteria andMedNameNotEqualTo(String value) {
            addCriterion("med_name <>", value, "medName");
            return (Criteria) this;
        }

        public Criteria andMedNameGreaterThan(String value) {
            addCriterion("med_name >", value, "medName");
            return (Criteria) this;
        }

        public Criteria andMedNameGreaterThanOrEqualTo(String value) {
            addCriterion("med_name >=", value, "medName");
            return (Criteria) this;
        }

        public Criteria andMedNameLessThan(String value) {
            addCriterion("med_name <", value, "medName");
            return (Criteria) this;
        }

        public Criteria andMedNameLessThanOrEqualTo(String value) {
            addCriterion("med_name <=", value, "medName");
            return (Criteria) this;
        }

        public Criteria andMedNameLike(String value) {
            addCriterion("med_name like", value, "medName");
            return (Criteria) this;
        }

        public Criteria andMedNameNotLike(String value) {
            addCriterion("med_name not like", value, "medName");
            return (Criteria) this;
        }

        public Criteria andMedNameIn(List<String> values) {
            addCriterion("med_name in", values, "medName");
            return (Criteria) this;
        }

        public Criteria andMedNameNotIn(List<String> values) {
            addCriterion("med_name not in", values, "medName");
            return (Criteria) this;
        }

        public Criteria andMedNameBetween(String value1, String value2) {
            addCriterion("med_name between", value1, value2, "medName");
            return (Criteria) this;
        }

        public Criteria andMedNameNotBetween(String value1, String value2) {
            addCriterion("med_name not between", value1, value2, "medName");
            return (Criteria) this;
        }

        public Criteria andMedEffectIsNull() {
            addCriterion("med_effect is null");
            return (Criteria) this;
        }

        public Criteria andMedEffectIsNotNull() {
            addCriterion("med_effect is not null");
            return (Criteria) this;
        }

        public Criteria andMedEffectEqualTo(String value) {
            addCriterion("med_effect =", value, "medEffect");
            return (Criteria) this;
        }

        public Criteria andMedEffectNotEqualTo(String value) {
            addCriterion("med_effect <>", value, "medEffect");
            return (Criteria) this;
        }

        public Criteria andMedEffectGreaterThan(String value) {
            addCriterion("med_effect >", value, "medEffect");
            return (Criteria) this;
        }

        public Criteria andMedEffectGreaterThanOrEqualTo(String value) {
            addCriterion("med_effect >=", value, "medEffect");
            return (Criteria) this;
        }

        public Criteria andMedEffectLessThan(String value) {
            addCriterion("med_effect <", value, "medEffect");
            return (Criteria) this;
        }

        public Criteria andMedEffectLessThanOrEqualTo(String value) {
            addCriterion("med_effect <=", value, "medEffect");
            return (Criteria) this;
        }

        public Criteria andMedEffectLike(String value) {
            addCriterion("med_effect like", value, "medEffect");
            return (Criteria) this;
        }

        public Criteria andMedEffectNotLike(String value) {
            addCriterion("med_effect not like", value, "medEffect");
            return (Criteria) this;
        }

        public Criteria andMedEffectIn(List<String> values) {
            addCriterion("med_effect in", values, "medEffect");
            return (Criteria) this;
        }

        public Criteria andMedEffectNotIn(List<String> values) {
            addCriterion("med_effect not in", values, "medEffect");
            return (Criteria) this;
        }

        public Criteria andMedEffectBetween(String value1, String value2) {
            addCriterion("med_effect between", value1, value2, "medEffect");
            return (Criteria) this;
        }

        public Criteria andMedEffectNotBetween(String value1, String value2) {
            addCriterion("med_effect not between", value1, value2, "medEffect");
            return (Criteria) this;
        }

        public Criteria andMedDescIsNull() {
            addCriterion("med_desc is null");
            return (Criteria) this;
        }

        public Criteria andMedDescIsNotNull() {
            addCriterion("med_desc is not null");
            return (Criteria) this;
        }

        public Criteria andMedDescEqualTo(String value) {
            addCriterion("med_desc =", value, "medDesc");
            return (Criteria) this;
        }

        public Criteria andMedDescNotEqualTo(String value) {
            addCriterion("med_desc <>", value, "medDesc");
            return (Criteria) this;
        }

        public Criteria andMedDescGreaterThan(String value) {
            addCriterion("med_desc >", value, "medDesc");
            return (Criteria) this;
        }

        public Criteria andMedDescGreaterThanOrEqualTo(String value) {
            addCriterion("med_desc >=", value, "medDesc");
            return (Criteria) this;
        }

        public Criteria andMedDescLessThan(String value) {
            addCriterion("med_desc <", value, "medDesc");
            return (Criteria) this;
        }

        public Criteria andMedDescLessThanOrEqualTo(String value) {
            addCriterion("med_desc <=", value, "medDesc");
            return (Criteria) this;
        }

        public Criteria andMedDescLike(String value) {
            addCriterion("med_desc like", value, "medDesc");
            return (Criteria) this;
        }

        public Criteria andMedDescNotLike(String value) {
            addCriterion("med_desc not like", value, "medDesc");
            return (Criteria) this;
        }

        public Criteria andMedDescIn(List<String> values) {
            addCriterion("med_desc in", values, "medDesc");
            return (Criteria) this;
        }

        public Criteria andMedDescNotIn(List<String> values) {
            addCriterion("med_desc not in", values, "medDesc");
            return (Criteria) this;
        }

        public Criteria andMedDescBetween(String value1, String value2) {
            addCriterion("med_desc between", value1, value2, "medDesc");
            return (Criteria) this;
        }

        public Criteria andMedDescNotBetween(String value1, String value2) {
            addCriterion("med_desc not between", value1, value2, "medDesc");
            return (Criteria) this;
        }

        public Criteria andMedPriceIsNull() {
            addCriterion("med_price is null");
            return (Criteria) this;
        }

        public Criteria andMedPriceIsNotNull() {
            addCriterion("med_price is not null");
            return (Criteria) this;
        }

        public Criteria andMedPriceEqualTo(BigDecimal value) {
            addCriterion("med_price =", value, "medPrice");
            return (Criteria) this;
        }

        public Criteria andMedPriceNotEqualTo(BigDecimal value) {
            addCriterion("med_price <>", value, "medPrice");
            return (Criteria) this;
        }

        public Criteria andMedPriceGreaterThan(BigDecimal value) {
            addCriterion("med_price >", value, "medPrice");
            return (Criteria) this;
        }

        public Criteria andMedPriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("med_price >=", value, "medPrice");
            return (Criteria) this;
        }

        public Criteria andMedPriceLessThan(BigDecimal value) {
            addCriterion("med_price <", value, "medPrice");
            return (Criteria) this;
        }

        public Criteria andMedPriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("med_price <=", value, "medPrice");
            return (Criteria) this;
        }

        public Criteria andMedPriceIn(List<BigDecimal> values) {
            addCriterion("med_price in", values, "medPrice");
            return (Criteria) this;
        }

        public Criteria andMedPriceNotIn(List<BigDecimal> values) {
            addCriterion("med_price not in", values, "medPrice");
            return (Criteria) this;
        }

        public Criteria andMedPriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("med_price between", value1, value2, "medPrice");
            return (Criteria) this;
        }

        public Criteria andMedPriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("med_price not between", value1, value2, "medPrice");
            return (Criteria) this;
        }

        public Criteria andTypeIdIsNull() {
            addCriterion("type_id is null");
            return (Criteria) this;
        }

        public Criteria andTypeIdIsNotNull() {
            addCriterion("type_id is not null");
            return (Criteria) this;
        }

        public Criteria andTypeIdEqualTo(Integer value) {
            addCriterion("type_id =", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdNotEqualTo(Integer value) {
            addCriterion("type_id <>", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdGreaterThan(Integer value) {
            addCriterion("type_id >", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("type_id >=", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdLessThan(Integer value) {
            addCriterion("type_id <", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdLessThanOrEqualTo(Integer value) {
            addCriterion("type_id <=", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdIn(List<Integer> values) {
            addCriterion("type_id in", values, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdNotIn(List<Integer> values) {
            addCriterion("type_id not in", values, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdBetween(Integer value1, Integer value2) {
            addCriterion("type_id between", value1, value2, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdNotBetween(Integer value1, Integer value2) {
            addCriterion("type_id not between", value1, value2, "typeId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}